package demo4;

abstract class A{
    abstract public void draw();
}

 class B extends A{
     @Override
     public void draw() {
         System.out.println("小花");
     }
 }

 class C extends B{
     @Override
     public void draw() {
         System.out.println("小黄花");
     }


 }

public class Teest {
    public static void main(String[] args) {
        B b = new B();
        C c = new C();
        b.draw();
        c.draw();
    }
}
